main :-
 write_string("?- "),
 read_line(Line),
 parse_string(Line, Term),
 ir2pl(Term,PLTerm,Variables),
 closed_list(Variables),
 !,
 ( execute_term(PLTerm,Variables) -> true
 ; write_string("no."), nl ),
 main.
execute_term(Term,Variables) :-
 call(Term),
 display_variables(Variables),
 read_character(More),write_character(More),nl,
 More \= 0';.
display_variables([]).
display_variables([Name --> Value|Variables]) :-
 nl,write(Name = Value),
 display_variables(Variables).
